import 'package:flutter/material.dart';
import 'package:get/get.dart';

enum RankType {
  video("影片", "SP"),
  cartoon("动漫", "video"),
  comic("漫画", "image"),
  post("帖子", "COVER"),
  pic("图集", "PIC");

  final String title;
  final String param;

  const RankType(this.title, this.param);
}

class RankMainLogic extends GetxController with GetTickerProviderStateMixin {
  final int initIndex;

  List<RankType> get tabs => [
        RankType.video,
        RankType.cartoon,
        RankType.comic,
        RankType.post,
        RankType.pic,
      ];

  late TabController tabCtr = TabController(
    initialIndex: initIndex,
    length: tabs.length,
    vsync: this,
  );

  RankMainLogic({this.initIndex = 0});
}
